﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.DocumentDB.Telemetry
{
    public class ReleaseVersion
    {
        public string TextVersion { get; set; }

        public static ReleaseVersion FromCurrentVersion()
        {
            return ReleaseVersion.FromVersion(typeof(TelemetryAgent).Assembly.GetName().Version);
        }

        public static ReleaseVersion FromVersion(Version releaseVersion)
        {
            return new ReleaseVersion
            {
                TextVersion = releaseVersion.ToString()
            };
        }
    }
}
